package featuremodel.predication;

import skyblue.Method;
import skyblue.SkyBlueDef;
import skyblue.Variable;

import featuremodel.FeatureRep;

public class CompositeMultiTrue extends Method {
	private Variable feature;

	public CompositeMultiTrue(Variable feature) {
		this.feature = feature;
		getOutputs().add(feature);

	}

	public void setTobeMethodType() {

		feature.setTobemethodtype(SkyBlueDef.METHOD_TYPE_BIND);
	}

	public void clearTobeMethodType() {
		feature.setTobemethodtype(null);

	}

	public void setTobeMethodType2() {
		feature.setTobeMethodType2(SkyBlueDef.METHOD_TYPE_BIND);

	}

	public void clearTobeMethodType2() {
		feature.setTobeMethodType2(null);
	}

	public void execute() {

		FeatureRep fp = (FeatureRep) feature.getValue().getValuerep();
		fp.setBindState(SkyBlueDef.VARIABLE_BIND);
		feature.setMethodtype(SkyBlueDef.METHOD_TYPE_BIND);
		feature.setTobemethodtype(null);

	}

}
